luci-mod-system/zram: replace deflate with zstd
authorRui Salvaterra <[email protected]>
Tue, 2 Mar 2021 09:31:22 +0000 (09:31 +0000)
committerHannu Nyman <[email protected]>
Sun, 14 Mar 2021 12:37:13 +0000 (14:37 +0200)
commit8d90ebaba9efae3cc902e39dea5f478790472654
tree5308f04028f906f57e605956aec2668cc0f9b4a3
parentc3b95818fe1cbe4d3d848b9b575851bdeb088113
luci-mod-system/zram: replace deflate with zstd

Deflate is just too slow for zram. Replace it with zstd, which is much faster at
similar compression ratios.

As a side note, this is an ugly hack. We're hard-coding compression algorithms
which might not be available in the system. The availability should be parsed
from /sys/block/zram0/comp_algorithm.

Signed-off-by: Rui Salvaterra <[email protected]>
(cherry picked from commit 02cadf67b23806b37ea71c0a16459876817b337b)
modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js